package routerGroup

import (
	"coursedesign/projectGo/controller"
	"coursedesign/projectGo/middleware"
	"github.com/gin-gonic/gin"
)

func CollectRoute(r *gin.Engine) *gin.Engine { //管理路由
	r.Use(middleware.CORSMiddleware())
	r.POST("/login", controller.Login)                                    //主页登录
	r.GET("/api/auth/info", middleware.AuthMiddleware(), controller.Info) // 获取用户信息

	storeGroup(r)
	companyGroup(r)
	enterGroup(r)
	deliverGroup(r)
	return r
}
